<template>
    <cl-transfer 
       v-model="rightValue" 
       :data="tranferData" 
       :props="transferProp">
    </cl-transfer>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
function  useTransfer() {
    const generateData = () => {
        const data = []
        for (let i = 0; i < 10; i++) {
            data.push({
                id: i,
                desc: `备选项${i}`,
                disabled: i % 4 == 0
            })
        }
        return ref(data)
    }
    return {
        tranferData: generateData(),
        rightValue:ref([1,4]),
        transferProp:{
            key:'id',
            label:'desc',
            disabled:'disabled'
        }
    }
}
export default defineComponent({
    setup() {
        return {
            ...useTransfer()
        }
    },

})
</script>
